<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div {
            text-align: center;
        }
        .main {
            margin: 0px auto;
            width: 440px;
            height: 440px;
            background-color: #CFF;
            display: flex;
            justify-content: space-around;
            border: 1px solid #ccc;
            flex-flow: row wrap;
            align-content: space-around;
        }

        .inner {

            width: 100px;
            line-height: 100px;

        }

        #div1{
            background-color:#FF9;
        }
        #div2{
            background-color:#ccf;
        }

        #div3{
            background-color:#CCC;
        }
        #div4{
            background-color:#F9C;
        }

        #div5{
            background-color: lightsalmon;
        }

        #div6{
            background-color: lightseagreen;
        }

        #div7{
            background-color: lemonchiffon;
        }

        #div8{
            background-color: deepskyblue;
        }

        #div9{
            background-color: crimson;
            flex-grow: 1;
            margin: 0px 5px;
        }

        #div10{
            background-color: greenyellow;
            flex-grow: 1;
            margin: 0px 5px;
        }
    </style>
</head>
<body>
<h1>flex布局案例</h1>
<hr>


<div class="main">
    <div class="inner" id="div1">
        我是DIV1
    </div>
    <div class="inner" id="div2">
        我是DIV2
    </div>
    <div class="inner" id="div3">
        我是DIV3
    </div>
    <div class="inner" id="div4">
        我是DIV4
    </div>
    <div class="inner" id="div5">
        我是DIV5
    </div>
    <div class="inner" id="div6">
        我是DIV6
    </div>
    <div class="inner" id="div7">
        我是DIV7
    </div>
    <div class="inner" id="div8">
        我是DIV8
    </div>
    <div class="inner" id="div9">
        我是DIV9
    </div>
    <div class="inner" id="div10">
        我是DIV10
    </div>

</div>

</body>
</html>